package com.lovo.manage_back.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户表
 * @TableName t_user
 */
@TableName(value ="t_user")
@Data
@NoArgsConstructor
public class User implements Serializable {
    /**
     * 用户id
     */
    @TableId(value = "u_id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @TableField(value = "u_username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "u_pwd")
    private String pwd;

    /**
     * 真实姓名
     */
    @TableField(value = "u_real_name")
    private String realName;

    /**
     * 创建时间
     */
    @TableField(value = "u_create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "u_update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    private List<Authority> authorities;

    public User(String username) {
        this.username = username;
    }
}